home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-10-26 | 3.8 KB | 94 lines |
- package com.symantec.itools.awt;
-
- import java.beans.*;
- import java.util.ResourceBundle;
- import java.awt.Image;
- import com.symantec.itools.beans.HelperBeanInfo;
- import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
-
- // 08/19/98 LAB Moved to GroupAWTAdditions folder.
- // 10/06/98 VJ Added code for grouping together currency properties
-
- public class CurrencyTextFieldBeanInfo extends HelperBeanInfo {
- protected final static String m_WinHelpID = "0x123AE";
-
- public CurrencyTextFieldBeanInfo() {
- setInheritSuperBeanInfo(true);
-
- ResourceBundle group = ResourceBundle.getBundle("com.symantec.itools.awt.GroupBundle");
- String s = group.getString("GroupAWTAdditions");
-
- setComponentLibraryFolder(s);
- setToolbarFolder(s);
- //setWinHelpKey(m_WinHelpID);
-
- // set icons
- set16x16ColorIconName("curr16.gif");
- set32x32ColorIconName("curr32.gif");
- set16x16MonoIconName("curr16bw.gif");
- set32x32MonoIconName("curr32bw.gif");
- }
-
- protected Class getBeanClass()
- {
- return beanClass;
- }
-
- //VJ start
- public PropertyDescriptor[] getPropertyDescriptors() {
- try{
- /*
- We don't want to display dataText - puru (10/26/98)
- PropertyDescriptor dataText = new PropertyDescriptor("dataText", beanClass,"getDataText",null);
- dataText.setBound(false);
- dataText.setConstrained(false);
- dataText.setDisplayName("Data Text");
- dataText.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
- */
-
- PropertyDescriptor decimalPoint = new PropertyDescriptor("decimalPoint", beanClass);
- decimalPoint.setBound(false);
- decimalPoint.setConstrained(false);
- decimalPoint.setDisplayName("Decimal Point");
- decimalPoint.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
-
- PropertyDescriptor digitsAfterDecimal = new PropertyDescriptor("digitsAfterDecimal", beanClass);
- digitsAfterDecimal.setBound(false);
- digitsAfterDecimal.setConstrained(false);
- digitsAfterDecimal.setDisplayName("Digits After Decimal");
- digitsAfterDecimal.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
-
- PropertyDescriptor currencyLeading = new PropertyDescriptor("currencyLeading", beanClass);
- currencyLeading.setBound(false);
- currencyLeading.setConstrained(false);
- currencyLeading.setDisplayName("Leading Symbol");
- currencyLeading.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
-
- PropertyDescriptor separator = new PropertyDescriptor("separator", beanClass);
- separator.setBound(false);
- separator.setConstrained(false);
- separator.setDisplayName("Separator");
- separator.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
-
- PropertyDescriptor separatorEnabled = new PropertyDescriptor("separatorEnabled", beanClass);
- separatorEnabled.setBound(false);
- separatorEnabled.setConstrained(false);
- separatorEnabled.setDisplayName("Separator Enabled");
- separatorEnabled.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
-
- PropertyDescriptor currencySymbol = new PropertyDescriptor("currencySymbol", beanClass);
- currencySymbol.setBound(false);
- currencySymbol.setConstrained(false);
- currencySymbol.setDisplayName("Symbol");
- currencySymbol.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
-
- PropertyDescriptor[] rv = {currencySymbol,currencyLeading,decimalPoint,digitsAfterDecimal,
- separator,separatorEnabled};
-
- return rv;
- } catch (IntrospectionException e) { throw new Error(e.toString()); }
- }
- //VJ end
- private final static Class beanClass = CurrencyTextField.class;
- }
-